package natappvip.liujinliang.util;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import natappvip.liujinliang.model.FileEle;

/**
 * @ClassName:  FileEleTrans   
 * @Despt: 数据库查询结果集转FileEle   
 * @Auth: Liujinliang 
 * @Date: 2018年7月29日 下午9:35:08
 */
public class FileEleTrans {
	
	private static Logger logger = LoggerFactory.getLogger(FileEleTrans.class);

	public static void ReSettoFileEle(ResultSet res, FileEle ele) {
		try {
			while(res.next()) {
				ele.set(res.getString("id"), 
						res.getInt("size"),
						res.getString("create_time"), 
						res.getInt("existed"));
			}
		} catch (SQLException e) {
			logger.info("结果集为空，错误信息：{}", e.getMessage());
		}
	}
}
